feat: statusline usage percentages and responsive layout#37
Conversation
Review Summary by QodoAdd usage percentages and responsive statusline layout
WalkthroughsDescription• Add 5h and weekly API usage percentages to statusline row 2 from rate_limits JSON input • Implement responsive layout with progressive truncation for narrow terminals (4-tier compaction) • Remove sparkline visualization and session cost display, keep duration text only • Shorten context bar from 20 to 10 characters and simplify git branch display • Add terminal width detection and dynamic row 2 formatting based on available space Diagramflowchart LR
A["statusLine JSON input"] -->|rate_limits| B["format_usage_percentages"]
B -->|5h/weekly %| C["Row 2 layout"]
D["Terminal width"] -->|responsive| C
C -->|≥100 cols| E["Full: context | usage | cost | duration"]
C -->|80-99 cols| F["Medium: context | usage | cost"]
C -->|60-79 cols| G["Compact: context | compact usage"]
C -->|<60 cols| H["Minimal: percentage | compact usage"]
I["Git branch"] -->|truncate_str| J["Row 1 progressive shortening"]
K["Directory path"] -->|truncate_str| J
File Changes1. scripts/statusline.py
|
Code Review by Qodo
1.
|
|
/agentic_review |
|
Persistent review updated to latest commit b1e182e |
Summary
rate_limitsJSON input (zero API calls)Changes
rate_limits.five_hour.used_percentageandrate_limits.seven_day.used_percentagefrom statusLine JSON stdin. Color-coded: green (<50%), yellow (50-75%), red (>75%)generate_sparkline()andget_duration_history()removed. Duration text (e.g., "24s") preservedRow 2 layout
context bar | 5h X% · weekly X% | $cost | durationTest plan
🤖 Generated with Claude Code